<@cms.voteList endStartDate=.now  pageSize=5>
    <#if page.totalCount gt 0>
	<header class="tab-header fs-5" data-diy="place" data-diy-id="${path}">
		<b class="pb-2"><a href="${site.dynamicPath}member/votelist.html">最新投票</a></b>
	</header>
	<div class="list-group list-group-flush article-list-side py-2 fs-7 mb-4">
		<#list page.list as a>
			<div class="list-group-item">
				<p class="text-body mb-1">
					<a href="${site.dynamicPath}member/vote.html?id=${a.id}">${a.title}</a>					
				</p>
				<footer class="fs-8 text-secondary text-opacity-50 d-flex align-items-center">
					<span class="me-4 d-inline-flex align-items-center"><#if .now gt a.endDate>已截止<#else>截止:${(a.endDate)?string('yyyy-MM-dd')}</#if></span>
				</footer>
				<p class="fs-7 text-secondary mt-2 mb-2">${a.description!}</p>
				
				<@cms.voteItemList voteId=a.id pageSize=3>
				<ol class="vote">
					<#if .now gt a.endDate && a.votes gt 0><#assign show=true/><#else><#assign show=false/></#if>
					<#list page.list as v>
					<li>
						<div class="progress-box">
							<div class="progress-bar" style="width:${show?then(v.votes*100/a.votes,100)}%;"></div>
							<div class="progress-text">
								<a href="${site.dynamicPath}member/vote.html?id=${a.id}" title="${v.title}">${v.title}<span class="float-end">${show?then(v.votes*100/a.votes+'%','投票后查看')}</span></a>
							</div>
						</div>
					</li>
					</#list>
				</ol>
			</@cms.voteItemList>
			</div>
		</#list>
	</div>
	</#if>
</@cms.voteList>
